<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
  mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.List],
  data() {
    return {
      appWindow: window,
      apiUrl: {
        list: "mall-site-portal/member/listMemberCoupon",
      },

      // 列表常量查询参数
      mixinList_tableSearchConst: {
        memberId: "",
      },
    };
  },
  props: ["userId"],
  mounted() {
    this.mixinList_tableSearchConst.memberId = this.userId;
    // 请求第一页
    this.mixinList_getTable();
  },
  methods: {
    statusNum2Text(num) {
      let text = "";
      switch (num) {
        case 1:
          text = "未使用";
          break;
        case 2:
          text = "已锁定";
          break;
        case 3:
          text = "已使用";
          break;
        case 4:
          text = "已过期";
          break;
        case 5:
          text = "已作废";
          break;
      }

      return text;
    },

    typeNum2Text(num) {
      let text = "";
      switch (num) {
        case 1:
          text = "代金券";
          break;
        case 2:
          text = "折扣券";
          break;
        case 3:
          text = "兑换券";
          break;
      }

      return text;
    },
  },
};
</script>
